home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Utilities / System 7 / AWOL Utilities 1.1 / Menu Events 1.1 / Menu Events Help / Menu Events Help.rsrc / STR#_1029.txt < prev    next >
Encoding:
Text File  |  1994-04-01  |  10.6 KB  |  657 lines

  1. 
  2.  
  3. 
  4.  
  5. §
  6.  
  7. §
  8.  
  9. √•Menu Events Suite
  10.  
  11. 
  12.  
  13. 
  14.  
  15. The following is a formal description of the Menu Events suite, in the form
  16.  
  17. used in the Apple Event Registry.
  18.  
  19. 
  20.  
  21. 
  22.  
  23. NOTE:  The C header file ‚ÄúMenu Events.h‚Äù¬†contains the constant
  24.  
  25. definitions which appear here.  The resource file ‚ÄúMenu Events 'aete'‚Äù
  26.  
  27. contains an 'aete' resource which you can add to any target application,
  28.  
  29. for the benefit of scripting packages such as AppleScript.
  30.  
  31. 
  32.  
  33. 
  34.  
  35. 
  36.  
  37. xApple events defined in the Menu Events suite
  38.  
  39. 
  40.  
  41. Name              Requested action
  42.  
  43. 
  44.  
  45. 
  46.  
  47. Query Menu List   List all application-defined menus
  48.  
  49. Query Menu        List all items in a menu
  50.  
  51. Select Menu Item  Perform a menu command
  52.  
  53. 
  54.  
  55. 
  56.  
  57. 
  58.  
  59. xQuery Menu List - list all application-defined menus
  60.  
  61. 
  62.  
  63. A Query Menu List Apple event asks the application to return a list of
  64.  
  65. records containing information about all menus defined by the application
  66.  
  67. in its menu bar.  This information includes the Apple menu, but not the
  68.  
  69. Help, Keyboard, or Application menus.
  70.  
  71. 
  72.  
  73. 
  74.  
  75. Event Class       kMEEventClass
  76.  
  77. 
  78.  
  79. Event ID          kAEMEQueryMenuList
  80.  
  81. 
  82.  
  83. Parameters        none
  84.  
  85. 
  86.  
  87. Reply Parameters
  88.  
  89. 
  90.  
  91. 
  92.  
  93. keyDirectObject
  94.  
  95.                   Description:  A list of Apple event
  96.  
  97.                                 records, one for each
  98.  
  99.                                 menu, each containing the
  100.  
  101.                                 following parameters
  102.  
  103.                   Descriptor Type:  typeAEList
  104.  
  105.                   Required or Optional?  Required
  106.  
  107. 
  108.  
  109. 
  110.  
  111. 
  112.  
  113.    keyMenuID
  114.  
  115.                   Description:  The ID of the menu, not
  116.  
  117.                                 necessarily equal to the
  118.  
  119.                                 ID of the 'MENU' resource
  120.  
  121.                                 it may have come from
  122.  
  123.                   Descriptor Type:  typeShortInteger
  124.  
  125.                   Required or Optional?  Required
  126.  
  127. 
  128.  
  129. 
  130.  
  131.    keyMenuTitle
  132.  
  133.                   Description:  The title of the menu, as
  134.  
  135.                                 it appears in the menu bar
  136.  
  137.                   Descriptor Type:  typeChar
  138.  
  139.                   Required or Optional?  Required
  140.  
  141. 
  142.  
  143. 
  144.  
  145.    keyMenuEnabled
  146.  
  147.                   Description:  Whether or not the menu, as
  148.  
  149.                                 a whole, is enabled
  150.  
  151.                   Descriptor Type:  typeBoolean
  152.  
  153.                   Required or Optional?  Required
  154.  
  155. 
  156.  
  157. 
  158.  
  159. 
  160.  
  161. keyMenuEventsTattoo
  162.  
  163.                   Description:  A null parameter to verify
  164.  
  165.                                 that Menu Events handled
  166.  
  167.                                 the event
  168.  
  169.                   Descriptor Type:  typeNull
  170.  
  171.                   Required or Optional?  Required
  172.  
  173. 
  174.  
  175. 
  176.  
  177. 
  178.  
  179. Result Codes
  180.  
  181.                   mBarNFnd        -126    The application has
  182.  
  183.                                           no menu bar
  184.  
  185. 
  186.  
  187. 
  188.  
  189. 
  190.  
  191. 
  192.  
  193. xQuery Menu - list all items in a menu
  194.  
  195. 
  196.  
  197. A Query Menu Apple event asks the application to return a list of records
  198.  
  199. containing information about all items in a given menu.  This information is
  200.  
  201. complete enough to reconstruct the menu, except for the icon resources
  202.  
  203. referenced by the keyMenuItemIcon parameter.
  204.  
  205. 
  206.  
  207. 
  208.  
  209. Event Class       kMEEventClass
  210.  
  211. 
  212.  
  213. Event ID          kAEMEQueryMenu
  214.  
  215. 
  216.  
  217. Parameters
  218.  
  219. 
  220.  
  221. 
  222.  
  223. keyMenuID
  224.  
  225.                   Description:  The ID of the menu, as
  226.  
  227.                                 returned by a Query Menu
  228.  
  229.                                 List Apple event
  230.  
  231.                   Descriptor Type:  typeShortInteger
  232.  
  233.                   Required or Optional?  Required
  234.  
  235. 
  236.  
  237. 
  238.  
  239. Reply Parameters
  240.  
  241. 
  242.  
  243. 
  244.  
  245. keyDirectObject
  246.  
  247.                   Description:  A list of Apple event
  248.  
  249.                                 records, one for each
  250.  
  251.                                 item, each containing the
  252.  
  253.                                 following parameters
  254.  
  255.                   Descriptor Type:  typeAEList
  256.  
  257.                   Required or Optional?  Required
  258.  
  259. 
  260.  
  261. 
  262.  
  263. 
  264.  
  265.    keyMenuItemID
  266.  
  267.                   Description:  The ID of the item, numbered
  268.  
  269.                                 from 1 at the top of the menu
  270.  
  271.                   Descriptor Type:  typeShortInteger
  272.  
  273.                   Required or Optional?  Required
  274.  
  275. 
  276.  
  277. 
  278.  
  279.    keyMenuItemText
  280.  
  281.                   Description:  The text of the item, as
  282.  
  283.                                 it appears in the menu
  284.  
  285.                   Descriptor Type:  typeChar
  286.  
  287.                   Required or Optional?  Required
  288.  
  289. 
  290.  
  291. 
  292.  
  293.    keyMenuItemEnabled
  294.  
  295.                   Description:  Whether or not the item is
  296.  
  297.                                 enabled
  298.  
  299.                   Descriptor Type:  typeBoolean
  300.  
  301.                   Required or Optional?  Required
  302.  
  303. 
  304.  
  305. 
  306.  
  307.    keyMenuItemMark
  308.  
  309.                   Description:  The mark character of the
  310.  
  311.                                 item, in the lower byte
  312.  
  313.                   Descriptor Type:  typeShortInteger
  314.  
  315.                   Required or Optional?  Required
  316.  
  317. 
  318.  
  319. 
  320.  
  321.    keyMenuItemIcon
  322.  
  323.                   Description:  The icon number of the item,
  324.  
  325.                                 which is 256 less than the
  326.  
  327.                                 resource ID of the 'ICON' or
  328.  
  329.                                 'cicn' resource
  330.  
  331.                   Descriptor Type:  typeShortInteger
  332.  
  333.                   Required or Optional?  Required
  334.  
  335. 
  336.  
  337. 
  338.  
  339.    keyMenuItemStyle
  340.  
  341.                   Description:  The style value of the item,
  342.  
  343.                                 in the lower byte
  344.  
  345.                   Descriptor Type:  typeShortInteger
  346.  
  347.                   Required or Optional?  Required
  348.  
  349. 
  350.  
  351. 
  352.  
  353.    keyMenuItemCmd
  354.  
  355.                   Description:  The Command-key equivalent
  356.  
  357.                                 character of the item, in the
  358.  
  359.                                 lower byte
  360.  
  361.                   Descriptor Type:  typeShortInteger
  362.  
  363.                   Required or Optional?  Required
  364.  
  365. 
  366.  
  367. 
  368.  
  369. 
  370.  
  371. keyMenuEventsTattoo
  372.  
  373.                   Description:  A null parameter to verify
  374.  
  375.                                 that Menu Events handled
  376.  
  377.                                 the event
  378.  
  379.                   Descriptor Type:  typeNull
  380.  
  381.                   Required or Optional?  Required
  382.  
  383. 
  384.  
  385. 
  386.  
  387. 
  388.  
  389. Result Codes
  390.  
  391.                   mBarNFnd        -126    The application has
  392.  
  393.                                           no menu bar
  394.  
  395. 
  396.  
  397. 
  398.  
  399.                   noSuchMenuErr   -21000  The application has
  400.  
  401.                                           no such menu
  402.  
  403. 
  404.  
  405. 
  406.  
  407.                   nonStandardMenuErr
  408.  
  409.                                   -21004  The menu does not
  410.  
  411.                                           use the standard
  412.  
  413.                                           menu definition
  414.  
  415.                                           function
  416.  
  417. 
  418.  
  419. 
  420.  
  421. 
  422.  
  423. 
  424.  
  425. xSelect Menu Item - perform a menu command
  426.  
  427. 
  428.  
  429. A Select Menu Item event requests user interaction to bring the
  430.  
  431. application to the front, then posts mouse events to simulate the selection
  432.  
  433. of the given menu item.  If the Menu event is correctly handled, and the
  434.  
  435. application reacts to the mouse events in the usual way, the result is as if
  436.  
  437. the user had actually selected that menu item.  Interaction will fail if the
  438.  
  439. application refuses to interact with other processes (kAEInteractWithSelf
  440.  
  441. mode), or, if the application is on another machine and the Menu Events
  442.  
  443. extension has been locked, if it refuses to interact with remote processes
  444.  
  445. (kAEInteractWithLocal mode).
  446.  
  447. 
  448.  
  449. Event Class       kMEEventClass
  450.  
  451. 
  452.  
  453. Event ID          kAEMESelectMenuItem
  454.  
  455. 
  456.  
  457. Parameters
  458.  
  459. 
  460.  
  461. 
  462.  
  463. keyMenuID
  464.  
  465.                   Description:  The ID of the menu, as
  466.  
  467.                                 returned by a Query Menu
  468.  
  469.                                 List Apple event
  470.  
  471.                   Descriptor Type:  typeShortInteger
  472.  
  473.                   Required or Optional?  Required
  474.  
  475. 
  476.  
  477. 
  478.  
  479. keyMenuItemID
  480.  
  481.                   Description:  The ID of the item, numbered
  482.  
  483.                                 from 1 at the top of the menu
  484.  
  485.                   Descriptor Type:  typeShortInteger
  486.  
  487.                   Required or Optional?  Required
  488.  
  489. 
  490.  
  491. 
  492.  
  493. Reply Parameters
  494.  
  495. 
  496.  
  497. 
  498.  
  499. keyMenuEventsTattoo
  500.  
  501.                   Description:  A null parameter to verify
  502.  
  503.                                 that Menu Events handled
  504.  
  505.                                 the event
  506.  
  507.                   Descriptor Type:  typeNull
  508.  
  509.                   Required or Optional?  Required
  510.  
  511. 
  512.  
  513. 
  514.  
  515. 
  516.  
  517. Result Codes
  518.  
  519.                   mBarNFnd        -126    The application has
  520.  
  521.                                           no menu bar
  522.  
  523. 
  524.  
  525. 
  526.  
  527.                   errAENoUserInteraction
  528.  
  529.                                   -1713   The application is
  530.  
  531.                                           refusing to interact
  532.  
  533.                                           with other processes
  534.  
  535.                                           or (if Menu Events
  536.  
  537.                                           extension is locked)
  538.  
  539.                                           with remote processes
  540.  
  541. 
  542.  
  543. 
  544.  
  545.                   noSuchMenuErr   -21000  The application has
  546.  
  547.                                           no such menu
  548.  
  549. 
  550.  
  551. 
  552.  
  553.                   noSuchMenuItemErr
  554.  
  555.                                   -21001  The menu has no
  556.  
  557.                                           such item
  558.  
  559. 
  560.  
  561. 
  562.  
  563.                   menuItemDisabledErr
  564.  
  565.                                   -21002  The item is
  566.  
  567.                                           disabled
  568.  
  569. 
  570.  
  571. 
  572.  
  573.                   menuEventPendingErr
  574.  
  575.                                   -21003  Another Menu event
  576.  
  577.                                           is already pending
  578.  
  579.                                           on this application
  580.  
  581. 
  582.  
  583. 
  584.  
  585.                   nonStandardMenuErr
  586.  
  587.                                   -21004  The menu does not
  588.  
  589.                                           use the standard
  590.  
  591.                                           menu definition
  592.  
  593.                                           function
  594.  
  595. 
  596.  
  597. 
  598.  
  599. 
  600.  
  601. 
  602.  
  603. xConstants defined in the Menu Events suite
  604.  
  605. 
  606.  
  607. Constant               Value
  608.  
  609. 
  610.  
  611. 
  612.  
  613. kAEMEQueryMenu         'qmn '
  614.  
  615. kAEMEQueryMenuList     'qmn#'
  616.  
  617. kAEMESelectMenuItem    'semi'
  618.  
  619. keyMenuEnabled         'mnen'
  620.  
  621. keyMenuEventsTattoo    'M√¶nu'
  622.  
  623. keyMenuID              'mnid'
  624.  
  625. keyMenuItemCmd         'micm'
  626.  
  627. keyMenuItemEnabled     'mien'
  628.  
  629. keyMenuItemIcon        'miic'
  630.  
  631. keyMenuItemID          'miid'
  632.  
  633. keyMenuItemMark        'mima'
  634.  
  635. keyMenuItemStyle       'mist'
  636.  
  637. keyMenuItemText        'mite'
  638.  
  639. keyMenuTitle           'mnti'
  640.  
  641. kMEEventClass          'M√¶nu'
  642.  
  643. menuEventPendingErr    -21003
  644.  
  645. menuItemDisabledErr    -21002
  646.  
  647. nonStandardMenuErr     -21004
  648.  
  649. noSuchMenuErr          -21000
  650.  
  651. noSuchMenuItemErr      -21001
  652.  
  653. 
  654.  
  655. 
  656.  
  657.